|
|
|
|
|
|
|
(table continued from previous page) |
|
|
|
|
| Lock-Type Option | Integer Value | Description | | rdConcurLock | 1 | Provides pessimistic locking for the entire row set. The lock occurs as soon as the data is accessednot when an Edit operation begins. | | rdConcurRowver | 2 | Provides optimistic locking based on internal row ID values (usually, the TimeStamp column). | | rdConcurValues | 3 | Provides optimistic locking based on a column-by-column check of the data in each row. | | rdConcurBatch | 4 | Provides optimistic locking based on the value in the UpdateCriteria property when using Batch Update mode. Not supported by all RDBMSs. |
|
|
|
|
|
|
The type of locking mechanism used can have a great effect on the performance of your application and the capability of others to access the shared data. The rdConcurReadOnly option allows anyone else to access the same data your application is using. Your application cannot update the dataset unless you are using action queries, however. The rdConcurLock option provides the greatest degree of locking. As soon as your dataset is created, all buffered rows in the dataset are locked. Because locks occur on pages, this can result in hundreds of record locks while your application browses the dataset. |
|
|
|
|
|
|
|
|
The rdConcurRowver and rdConcurValues options allow optimistic locking schemes. In the rdConcurRowver option, each record's ID value (usually, the TimeStamp column) is checked at the time the row is updated. If the ID has changed since your application retrieved the data, an error is reported. In the rdConcurValues option, each value in the row's columns is checked against the original value. If the value has changed since your application received the dataset, an error is reported. |
|
|
|
|
|
|
|
|
The least intrusive form of locking for read/write datasets is the rdConcurRowver or rdConcurValues option. The most secure form of locking for read/write datasets is the rdConcurLock option. An advantage that RDC/RDOs have over Microsoft Jet is that you easily can tune the number of rows in the row set by using the RowsetSize property. If you set this property sufficiently low, you can use the rdConcurLock option without adversely affecting other users who are attempting to access the remote data. |
|
|
|
|
|
|
|
|
Now that you understand the basics of accessing remote data, you are ready to begin using the RDC and RDO tools to build Visual Basic programs that read and update remote data sources. |
|
|
|
|
|